import { BillItem } from "./wms-model";
import { defHttp } from '/@/utils/http/axios';

enum Api {
  Crud = '/wms/bill/inbound',
  Table = '/wms/bill/inbound/table',
  List = '/wms/bill/inbound/list',
  Code = '/wms/bill/inbound/code',
}

export const getTableData = (params:any) => defHttp.get<BillItem[]>({ url: Api.Table, params: params });

export const getListData = () => defHttp.get<BillItem[]>({ url: Api.List });

export const getByCode = (params:any) => defHttp.get({url: Api.Code, params: params});

export const create = (params: any) => defHttp.post({url: Api.Crud, params});

export const update = (params: any) => defHttp.put({url: Api.Crud, params});

export const deletes = (params: number[]) => defHttp.delete({url: Api.Crud, data: params});

